package com.agent.vpsserver.modules.server.request;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户账号信息(UserAccount)表实体类
 *
 * @author guochao
 * @since 2024-03-12 23:50:23
 */
@Data
public class UserAccountSaveRequest {

    private Long id;
    /**
     * 服务器信息id
     */
    @NotNull
    @ApiModelProperty(value = "服务器信息id", required = true)
    private Long serverId;

    /**
     * 用户名
     */
    @NotBlank
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    /**
     * 密码
     */
    @NotBlank
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    /**
     * 过期时间
     */
    @ApiModelProperty(value = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;
    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 用户流量
     */
    @ApiModelProperty(value = "用户流量，单位GB")
    private BigDecimal maxBandwidth;

    /**
     * 账号状态 1、正常 2、封禁 3、冻结
     */
    @ApiModelProperty(value = "账号状态 1、正常 2、封禁 3、冻结")
    private Integer status;

}
